#!/bin/bash
#
# Author: LEDUCA
#
# chkconfig: 2345 80 80
#
# description: Markings System with Facial Recnognition daemon
#
# Source function library.
. /etc/init.d/functions

RETVAL=0;
 
start() {
echo "Starting Markings FAC-REC Daemon"
cd /opt/facrec
python server.py --port=8888 1>>log1.txt 2>>log2.txt &
}
 
stop() {
echo "Stopping Markings FAC-REC Daemon"
pkill python
}
 
restart() {
stop
start
}
 
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
 
exit $RETVAL